<?php

	//title
	$this->helpers->htmlx->MenuText1(Language::Get('Charts'), 'list.gif');

	/* BY ACCOUNT TYPE */

	$typeChart = new GoogleChart();
	$typeChart->containerId = 'byTypeChart';
	$typeChart->title = LANG_BY_ACCOUNT_TYPE;
	$typeChart->width = 600;
	$typeChart->height = 300;
	$typeChart->hAsixLabel = ucfirst(LANG_ACCOUNT_TYPES);
	foreach ($this->data['by_types'] as $type => $value)
	{
		$typeChart->AddColumn(array('type' => 'number', 'title' => $type));
		$values[] = $value;
	}
	$typeChart->AddRow($values);
	$typeChart->DisplayChart();
	
	echo '<br /><br />';
	
	
	/* BY COUNTRY */

	$countryChart = new GoogleChart();
	$countryChart->containerId = 'byCountryChart';
	$countryChart->title = LANG_BY_COUNTRY;
	$countryChart->width = 600;
	$countryChart->height = 300;
	$countryChart->hAsixLabel = ucfirst(LANG_COUNTRIES);
	$i = 0;
	foreach ($this->data['by_countries'] as $type => $value)
	{
		if ($i == 10) break;
		$countryChart->AddColumn(array('type' => 'number', 'title' => $type));
		$countryValues[] = $value;
		$i++;
	}
	$countryChart->AddRow($countryValues);
	$countryChart->DisplayChart();	
	
	echo '<br /><br />';
	
	
	/* BY COUNTRY (PROFIT) */
	$countryProfitChart = new GoogleChart();
	$countryProfitChart->containerId = 'byCountryProfitChart';
	$countryProfitChart->title = LANG_BY_COUNTRY_PROFIT;
	$countryProfitChart->width = 600;
	$countryProfitChart->height = 300;
	$countryProfitChart->hAsixLabel = ucfirst(LANG_COUNTRIES);
	$j = 0;
	foreach ($this->data['by_countries_profit'] as $type => $value)
	{
		if ($j == 10) break;
		$countryProfitChart->AddColumn(array('type' => 'number', 'title' => $type));
		$countryProfitValues[] = $value;
		$j++;
	}
	$countryProfitChart->AddRow($countryProfitValues);
	$countryProfitChart->DisplayChart();	
	
?>
    
